package cn.jetpiece.cloud.system.dp.api.biz;

import cn.jetpiece.cloud.model.page.PageResult;
import cn.jetpiece.cloud.model.response.Result;
import cn.jetpiece.cloud.system.dp.api.biz.model.params.CreateDpTProjectParam;
import cn.jetpiece.cloud.system.dp.api.biz.model.params.UpdateDpTProjectParam;
import cn.jetpiece.cloud.system.dp.api.biz.model.query.DpTAppQuery;
import cn.jetpiece.cloud.system.dp.api.biz.model.query.DpTProjectQuery;
import cn.jetpiece.cloud.system.dp.api.biz.model.result.DpTAppResult;
import cn.jetpiece.cloud.system.dp.api.biz.model.result.DpTProjectResult;
import cn.jetpiece.cloud.resource.annotation.annotation.ApiResource;
import cn.jetpiece.cloud.resource.annotation.annotation.ScanResource;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.filter.CharacterEncodingFilter;
import org.springframework.web.filter.FormContentFilter;
import org.springframework.web.filter.OncePerRequestFilter;
import org.springframework.web.filter.RequestContextFilter;
import org.springframework.web.method.support.InvocableHandlerMethod;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.DispatcherServlet;
import org.springframework.web.servlet.FrameworkServlet;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter;
import org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod;

import javax.validation.Valid;
import java.lang.annotation.Native;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * dp_t_project
 *
 * @author jetpiece
 * @since 2023-05-15
 */
@Api(tags = "dp_t_project")
@ApiResource(name = "dp_t_project")
public interface DpTProjectApi {

    String API = "/datapipeline/biz/dpTProjects";

    /**
     * 新增dp_t_project
     *
     * @param param 新增参数
     * @return 返回结果
     */
    @ApiOperation(value = "新增dp_t_project")
    @ScanResource(name = "新增dp_t_project", path = API, method = RequestMethod.POST)
    Result<String> add(@RequestBody @Valid CreateDpTProjectParam param);

    /**
     * 修改dp_t_project
     *
     * @param param 修改参数
     * @return 返回结果
     */
    @ApiOperation(value = "修改dp_t_project")
    @ScanResource(name = "修改dp_t_project", path = API, method = RequestMethod.PUT)
    Result<String> update(@RequestBody @Valid UpdateDpTProjectParam param);

    /**
     * 删除dp_t_project
     *
     * @param id 主键
     * @return 返回结果
     */
    @ApiOperation(value = "删除dp_t_project")
    @ScanResource(name = "删除dp_t_project", path = API + "/{id}", method = RequestMethod.DELETE)
    Result<String> delete(@PathVariable(name = "id") Long id);


    /**
     * 批量删除dp_t_project
     *
     * @param ids
     * @return 返回结果
     */
    @ApiOperation(value = "批量删除dp_t_project")
    @ScanResource(name = "批量删除dp_t_project", path = API+"/batch-del/{ids}", method = RequestMethod.DELETE)
    Result<String> deleteBatch(@PathVariable("ids") String ids);

    /**
     * 查询dp_t_project信息
     *
     * @param id 主键
     * @return 返回结果
     */
    @ApiOperation(value = "查询dp_t_project信息")
    @ScanResource(name = "查询dp_t_project信息", path = API + "/{id}", method = RequestMethod.GET)
    Result<DpTProjectResult> get(@PathVariable(name = "id") Long id);
    
    /**
     * 分页获取dp_t_project
     *
     * @param query 查询条件
     * @return 返回结果
     */
    @ApiOperation(value = "分页获取dp_t_project")
    @ScanResource(name = "分页获取dp_t_project",path = API, method = RequestMethod.GET)
    Result<PageResult<DpTProjectResult>> page(@Valid @SpringQueryMap DpTProjectQuery query);

}
